package cn.edu.ctbu.datajpa01.repository;

import cn.edu.ctbu.datajpa01.domain.Student;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;


public interface StudentRepository extends JpaRepository<Student,Integer> {


    /***
     * 按名字进行模糊查询
     * @param name
     * @return
     */
    List<Student> findByNameLike(String name);

    /**
     * 按名字和密码查询
     * @return
     */

    List<Student> findByNameAndPassword(String name,String password);

    Student  findByNo(String no);
}
